package com.ruoqing.utils.common;

import org.springframework.data.redis.core.RedisConnectionUtils;
import org.springframework.data.redis.core.RedisTemplate;

/**
	* @author YaoXian
	* @title: RedisUtils
	* @projectName ruoxi-blog
	* @description: 若兮微服务 - 核心模块 - Redis相关工具类
	* @date 2020-12-24 17:56
	*/
public class RedisUtils {
		
		public static void closeRedisConnection(RedisTemplate redisTemplate){
				if (redisTemplate.getConnectionFactory()!=null){
						RedisConnectionUtils.unbindConnection(redisTemplate.getConnectionFactory());
				}
		}
}
